/**
 * 把对象的属性转成数组
 */
export const objectToArray = (object) => {
    let array = [];
    for (const key in object) {
        if (Object.hasOwnProperty.call(object, key)) {
            const element = object[key];
            array.push({
                id: key,
                title: element
            })
        }
    }
    return array;
}